Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

[Backport to 0.34] Prevent a shutdown hook from being removed in JaegerTracer when a shutdown is in progress #690

Merged

Conversation

TomasHofman
Copy link
Contributor

@TomasHofman TomasHofman commented Feb 13, 2020

Prevent a shutdown hook from being removed in JaegerTracer when a shutdown is in progress

Signed-off-by: Tomas Hofman thofman@redhat.com

Which problem is this PR solving?

This is follow up PR for #679

The problem this PR is solving that when a JaegerTracer is closed as a result of shutdown, the attempt to remove its' close shutdown hook fails with IllegalStateException. I.e. the shutdown hook cannot be removed when shutdown is already in progress.

Short description of the changes

Do not remove a shutdown hook when a shutdown is already in progress.

@codecov
Copy link

codecov bot commented Feb 13, 2020

Codecov Report

Merging #690 into release-0.34 will increase coverage by 0.15%.
The diff coverage is 100%.

Impacted file tree graph

@@                Coverage Diff                 @@
##             release-0.34     #690      +/-   ##
==================================================
+ Coverage           89.39%   89.55%   +0.15%     
- Complexity            542      543       +1     
==================================================
  Files                  68       68              
  Lines                1952     1953       +1     
  Branches              252      252              
==================================================
+ Hits                 1745     1749       +4     
+ Misses                131      129       -2     
+ Partials               76       75       -1
Impacted Files Coverage Δ Complexity Δ
...n/java/io/jaegertracing/internal/JaegerTracer.java 89.16% <100%> (+1.12%) 27 <0> (+1) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a78652...fdd76f6. Read the comment docs.

…tdown is in progress

Signed-off-by: Tomas Hofman <thofman@redhat.com>
@TomasHofman TomasHofman changed the title Catch IllegalStateException during shutdown hook removal attempt... Prevent a shutdown hook from being removed in JaegerTracer when a shutdown is in progress Feb 13, 2020
@yurishkuro
Copy link
Member

looks like a duplicate of #689

@yurishkuro yurishkuro closed this Feb 13, 2020
@TomasHofman
Copy link
Contributor Author

@yurishkuro this is for 0.34 stream. The original commit is in 0.34 too.

@yurishkuro yurishkuro reopened this Feb 14, 2020
@yurishkuro yurishkuro merged commit 0a12e7a into jaegertracing:release-0.34 Feb 15, 2020
@pavolloffay pavolloffay changed the title Prevent a shutdown hook from being removed in JaegerTracer when a shutdown is in progress [Backport to 0.34] Prevent a shutdown hook from being removed in JaegerTracer when a shutdown is in progress Feb 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants